package com.sychip.fhc

import com.sychip.fhc.app.todo.BuildConfig
import com.sychip.fhc.app.todo.R

val IS_DEBUG = BuildConfig.IS_DEBUG
enum class AppType(val value: String)  {
    AcControl("AcControl"),WSN("WSN"),DRAWER("DRAWER"),Todo("Todo"),BleNFC("BleNFC"),;

    companion object {
        fun fromValue(value: String?): AppType {
            val rtn = entries.find { it.value.equals(value, ignoreCase = true) }
            return rtn ?: WSN
        }
    }
}



object APP {
    private var _type: AppType = AppType.WSN

    var TYPE: AppType
        get() = _type
        set(value) {
            _type = value
        }
    val TITLE
        get() = when (TYPE) {
            AppType.AcControl -> {
                MainApplication.instance().getString(R.string.app_name_2ku)
            }
            AppType.WSN -> {
                MainApplication.instance().getString(R.string.wsn_app_name)
            }
            AppType.BleNFC -> {
                MainApplication.instance().getString(R.string.app_name_nfc)
            }
            else -> {
                MainApplication.instance().getString(R.string.app_name)
            }
        }

}


